<template>
  <div>
    <p>Gege</p>
    <button @click="publishHandle">发布数据</button>
  </div>
</template>

<script>
import PubSub from "pubsub-js";
export default {
  name: "Gege",
  data() {
    return {
      count: 1,
    };
  },
  methods: {
    publishHandle() {
      PubSub.publish("msg", this.count);
    },
  },
};
</script>

<style></style>
